/********************************************************************
  Copyright by PCI, 2002-10-08
  File Name: db_ppm_product_rela_his.cxx
  Created Date: 2002-10-08 
  Author: Machine
  Version: 1.0 
  Last Version Date: 
  Version Date:
*******************************************************************/
/********************************************************************
  Copyright by PCI, 2002-10-08
  Class Name: CTable_PPM_PRODUCT_RELA_HIS
  Created Date: 2002-10-08 
  Author: Machine
  Defined File: db_ppm_product_rela_his.hxx
  Last Version Date: 
  Version Date:
*******************************************************************/
#include "table_ppm.h"

CTable_PPM_PRODUCT_RELA_HIS::CTable_PPM_PRODUCT_RELA_HIS( )
 :NPCRecordSet( )
{
  setTableName( "PPM_PRODUCT_RELATION_HIS" );
  prepareTable();
  prepareQuery();
 
  PRODUCT_CD.setField( "PRODUCT_CD", DATA_CHAR, 30, 0 );
  makeTableItem( PRODUCT_CD );
  PRODUCT_ID.setField( "PRODUCT_Z_ID", DATA_DOUBLE, 9, 0 );
  makeTableItem( PRODUCT_ID );
  PRO_PRODUCT_CD.setField( "PRO_PRODUCT_CD", DATA_CHAR, 30, 0 );
  makeTableItem( PRO_PRODUCT_CD );
  PROD_COMP_ROLE_CD.setField( "ROLE_CD", DATA_DOUBLE, 9, 0 );
  makeTableItem( PROD_COMP_ROLE_CD );
  REMARK.setField( "REMARK", DATA_CHAR, 1024, 0 );
  makeTableItem( REMARK );
  STATE_CD.setField( "STATE_CD", DATA_CHAR, 3, 0 );
  makeTableItem( STATE_CD );
  STATE_DATE.setField( "STATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( STATE_DATE );
  CREATE_DATE.setField( "CREATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( CREATE_DATE );
  HIS_ID.setField( "HIS_ID", DATA_CHAR, 20, 1 );
  makeTableItem( HIS_ID );
  makeKeyItem( HIS_ID ); 
  APP_ID.setField( "APP_ID", DATA_CHAR, 20, 0 );
  makeTableItem( APP_ID );
  PRODUCT_REL_ID.setField( "PRODUCT_REL_ID", DATA_DOUBLE, 9, 2 );
  makeTableItem( PRODUCT_REL_ID );
  makeKeyItem(PRODUCT_REL_ID);
  RELATION_TYPE_CD.setField( "RELATION_TYPE_CD", DATA_CHAR, 3, 0 );
  makeTableItem( RELATION_TYPE_CD );
  PRO_PRODUCT_ID.setField( "PRODUCT_A_ID", DATA_DOUBLE, 9, 0 );
  makeTableItem( PRO_PRODUCT_ID );
  APP_STATE.setField( "APP_STATE", DATA_CHAR, 20, 0 );
  makeTableItem( APP_STATE );
  DEFAULT_OR_RELA.setField( "DEFAULT_OR_RELA", DATA_CHAR, 6, 0 );
  makeTableItem( DEFAULT_OR_RELA );
  EXP_DATE.setField( "EXP_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EXP_DATE );
  EFF_DATE.setField( "EFF_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EFF_DATE );
  RELA_SOURCE.setField( "RELA_SOURCE", DATA_CHAR, 6, 0 );
  makeTableItem( RELA_SOURCE );
}


CTable_PPM_PRODUCT_RELA_HIS::CTable_PPM_PRODUCT_RELA_HIS( NPConnection& pcldb )
 :NPCRecordSet( pcldb )
{
  setTableName( "PPM_PRODUCT_RELATION_HIS" );
  prepareTable();
  prepareQuery();
 
  PRODUCT_CD.setField( "PRODUCT_CD", DATA_CHAR, 30, 0 );
  makeTableItem( PRODUCT_CD );
  PRODUCT_ID.setField( "PRODUCT_Z_ID", DATA_DOUBLE, 9, 0 );
  makeTableItem( PRODUCT_ID );
  PRO_PRODUCT_CD.setField( "PRO_PRODUCT_CD", DATA_CHAR, 30, 0 );
  makeTableItem( PRO_PRODUCT_CD );
  PROD_COMP_ROLE_CD.setField( "ROLE_CD", DATA_DOUBLE, 9, 0 );
  makeTableItem( PROD_COMP_ROLE_CD );
  REMARK.setField( "REMARK", DATA_CHAR, 1024, 0 );
  makeTableItem( REMARK );
  STATE_CD.setField( "STATE_CD", DATA_CHAR, 3, 0 );
  makeTableItem( STATE_CD );
  STATE_DATE.setField( "STATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( STATE_DATE );
  CREATE_DATE.setField( "CREATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( CREATE_DATE );
  HIS_ID.setField( "HIS_ID", DATA_CHAR, 20, 1 );
  makeTableItem( HIS_ID );
  makeKeyItem( HIS_ID ); 
  APP_ID.setField( "APP_ID", DATA_CHAR, 20, 0 );
  makeTableItem( APP_ID );
  PRODUCT_REL_ID.setField( "PRODUCT_REL_ID", DATA_DOUBLE, 9, 2 );
  makeTableItem( PRODUCT_REL_ID );
  makeKeyItem(PRODUCT_REL_ID);
  RELATION_TYPE_CD.setField( "RELATION_TYPE_CD", DATA_CHAR, 3, 0 );
  makeTableItem( RELATION_TYPE_CD );
  PRO_PRODUCT_ID.setField( "PRODUCT_A_ID", DATA_DOUBLE, 9, 0 );
  makeTableItem( PRO_PRODUCT_ID );
  APP_STATE.setField( "APP_STATE", DATA_CHAR, 20, 0 );
  makeTableItem( APP_STATE );
  DEFAULT_OR_RELA.setField( "DEFAULT_OR_RELA", DATA_CHAR, 6, 0 );
  makeTableItem( DEFAULT_OR_RELA );
  EXP_DATE.setField( "EXP_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EXP_DATE );
  EFF_DATE.setField( "EFF_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EFF_DATE );
  RELA_SOURCE.setField( "RELA_SOURCE", DATA_CHAR, 6, 0 );
  makeTableItem( RELA_SOURCE );
}

CTable_PPM_PRODUCT_RELA_HIS::~CTable_PPM_PRODUCT_RELA_HIS( )
{
    close();
}

